<!DOCTYPE html>
<html>
<head>
<base href="<?php echo XXF_HTTP?>" />
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<title>评教系统</title>
<style type="text/css">
*{margin:0;padding:0;}
</style>
<script src="js/jquery.js"></script>
<script src="js/jquery.xxfset.js"></script>
<script>
function _isidcard(idcard){
	if(idcard.length!=18)return false;
	return true;
}
function login(){
	var idcard=document.getElementById("idcard").value;
	var info=document.getElementById("info");
	if(_isidcard(idcard)){
		$.xloading(0);
		var tim=setTimeout(function(){
			login();
		},5000);
		$.post("sjpj",{type:"login",idcard:idcard},function(data){
			clearTimeout(tim);
			if(data==1){
				location.href='sjpj_class';
			}else if(data==0){
				$.xloading(0);
				info.innerHTML="未查询到相关信息！";
			}else{
				$.xloading(0);
				info.innerHTML=data;
			}
		}).error(function(){
			clearTimeout(tim);
			login();
		});
	}else{
		info.innerHTML="身份证输入有误，请从新输入！";
	}
}
$(function(){
	$("#idcard").focus(function(){
		$("#info").html("");
	});
});
</script>
</head>
<body style="background-color: #eee">
	<div style="font-size: 50px;font-weight:bold;text-align:center;margin-top:100px;">重庆市矿业工程学校学生评教系统</div>
    <div style="width: 280px;margin:0 auto;padding-top:100px;font-size:30px;text-align:center;">
    	输入身份证<br>
    	<input type="text" id="idcard" autofocus="autofocus" style="width: 150px;height:30px;text-algin:center;">
    	<br>
    	<input type="button" value="点击登陆" onclick="login()" style="width: 100px;height:30px;">
    	<div id="info" style="color: red;"></div>
    </div>
</body>
</html>